package com.accedo.achievements.services.ajax;

import net.sf.json.JSONObject;

public interface CampaignService {

	/**
	 * Get all campaigns in three state categories : finished, playing and none.
	 * <p>the sequence is grouped by the latest campaign to the front.
	 * <p>finished state means this user already unlocked all achievements and obtained the award of this campaign.<br>
	 * playing state means this user has at least unlocked one of the achievements, but has not obtained the award.<br>
	 * none state means this user has never unlocked any achievements related to the campaign.
	 * @param username	user name
	 * @return			JSON campaigns<br>
	 * eg. {camps:[{camp_sn:'CAMP011', camp_name:'CAMP011 NAME', camp_end:'2012.08.09 Thu 12:00', state:'playing'},
	 * {camp_sn:'CAMP010', camp_name:'CAMP010 NAME', camp_end:'2012.08.08 Wed 00:00', state:'none'}]}
	 */
	public JSONObject getJsonCampsByUsername(String username);
	
	/**
	 * Get all campaigns in three state categories : finished, playing and none.
	 * <p>the sequence is grouped by finished campaign, playing campaign and then none campaign.
	 * <p>finished state means this user already unlocked all achievements and obtained the award of this campaign.<br>
	 * playing state means this user has at least unlocked one of the achievements, but has not obtained the award.<br>
	 * none state means this user has never unlocked any achievements related to the campaign.
	 * @param username	user name
	 * @return			JSON campaigns<br>
	 * eg. {camps:[{camp_sn:'CAMP011', camp_name:'CAMP011 NAME', camp_end:'2012.08.09 Thu 12:00', state:'finished'},
	 * {camp_sn:'CAMP002', camp_name:'CAMP002 NAME', camp_end:'2012.08.01 Wed 00:00', state:'playing'},
	 * {camp_sn:'CAMP010', camp_name:'CAMP010 NAME', camp_end:'2012.08.08 Wed 00:00', state:'none'}]}
	 */
	public JSONObject getJsonCampsByUsernameForFriendShow(String username);
}
